cmake_minimum_required(VERSION 3.27)
project(log4single)

set(CMAKE_CXX_STANDARD 11)
## C的解决办法
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fexec-charset=utf-8")
## C++ 的解决办法
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fexec-charset=utf-8")



set(LOG4CPP_INCLUDE_DIR /usr/include/log4cpp)
include_directories(${LOG4CPP_INCLUDE_DIR})

add_executable(log4single main.cpp
        MyLogger.cpp
        MyLogger.h
        Logger.cpp
        Logger.h
        test.cpp)
target_link_libraries(log4single liblog4cpp.so)